%%% @author  <Administrator@KEVIN-PC>
%%% @copyright (C) 2012, 
%%% @doc
%%% 
%%% @end
%%% Created : 21 Mar 2012 by  <Administrator@KEVIN-PC>

-module(ajian_math).

-export([floor/1]).

-spec floor(integer())-> integer().
floor(X) when X < 0 ->   
  T = trunc(X),   
  case (X - T) =:= 0 of       
       true -> T;
       false -> T - 1   
  end;
floor(X) ->    trunc(X).

